#pragma once

#include "../Core/Buffer.h"

namespace krt {

	class KRT_API Texture {
	public:
		Texture() {}

		virtual glm::vec3 GetValue(const glm::vec2& uv) const = 0;

	};

	class KRT_API ConstantTexture : public Texture {
	public:
		ConstantTexture(const glm::vec3& color) :m_Color(color) {}

		virtual glm::vec3 GetValue(const glm::vec2& uv) const override {
			return m_Color;
		}

	private:
		glm::vec3 m_Color;

	};

	class KRT_API Texture2D : public Texture {
	public:
		Texture2D(Ref<ImageBuffer> imgbuffer) :m_Buffer(imgbuffer) {}

		virtual glm::vec3 GetValue(const glm::vec2& uv) const override;

	private:
		Ref<ImageBuffer> m_Buffer;

	};

}